package com.tuanzi.loan.business.service.family.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tuanzi.loan.business.repository.family.LoanOrderRepository;
import com.tuanzi.loan.business.service.family.LoanOrderService;
import com.tuanzi.loan.core.aspect.Debug;

/**
 * @author Ray 2017/09/21
 */
@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class LoanOrderServiceImpl implements LoanOrderService {

	@Autowired
	private LoanOrderRepository loanOrderRepository;

	@Override
	public Long countByUserIdAndSourceId(Long userId, Long sourceId) {
		return loanOrderRepository.countByUserIdAndSourceId(userId, sourceId);
	}
}
